<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<!-- 1.依次输出什么?
		  gb: undefiend
		  fb: 1
		  fb: 2
		  fb: 3
		  fe: 3
		  fe: 2
		  fe: 1
		  ge: 1
		2.整个过程中产生了几个执行上下文? 5 -->
		
		<script type="text/javascript">
			console.log('gb: '+ i)
			var i = 1
			foo(1);
			function foo(i){
				if(i==4){
					return;
				}
				console.log('foo() begin:' + i);
				foo(i + 1);//递归调用：在函数内部调用自己
				console.log('foo() end:' + i);
			}
			console.log('ge: ' + i);
		</script>
	</body>
</html>
